@mixin fz-m($fontSize: 16px) {
    font-family: PingFangSC-Medium, 'PingFang SC';
    font-size: $fontSize;
    font-weight: 500;
}

@mixin fz-r($fontSize: 14px) {
    font-family: PingFangSC-Regular, 'PingFang SC';
    font-size: $fontSize;
    font-weight: 400;
}

:deep(.poster-setting) {
    .el-form-item {
        margin-bottom: 24px;
    }

    .el-form-item + .form-title {
        padding-top: 8px;
    }

    .el-input {
        width: 420px;
        max-width: 420px;
    }

    .el-form-item__error {
        transform: translateY(3px);
    }

    .el-input-number {
        width: 80px;
        text-align: left;

        .el-input-number__increase,
        .el-input-number__decrease {
            width: 28px;
            border: 0 none;
            background-color: transparent;
        }

        .el-input__wrapper {
            padding-left: 8px;
        }

        .el-input__inner {
            text-align: left;
        }

        &.is-without-controls {
            .el-input__wrapper {
                padding-left: 12px;
            }
        }
    }

    // 模块小标题
    .form-title {
        display: flex;
        align-items: center;
        margin-bottom: 24px;
        color: #333;

        @include fz-m;

        &::before {
            width: 3px;
            height: 16px;
            margin-right: 6px;
            content: '';
            border-radius: 2px;
            background-color: #ff6b00;
        }
    }

    // el-radio的formitem边距
    .form-radio-item,
    .form-switch-item {
        margin-top: -8px;
        margin-bottom: 12px;
    }

    .form-switch-item-center {
        margin-top: -4px;
        margin-bottom: 18px;
    }

    .poster-switch {
        margin-right: 26px;
    }

    // 海报开关里的表单项
    .poster-form-item {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        vertical-align: middle;
        color: #333;

        @include fz-r;

        > span {
            margin-right: 9px;
        }

        > div {
            margin-right: 24px;
        }

        .el-select {
            width: 90px;

            .el-input {
                width: 100%;
                min-width: none;
            }
        }

        // 颜色选择器
        .el-color-picker__trigger {
            padding: 0;
            border: 0;
            border-radius: 4px;
        }

        .el-color-picker__color {
            border: 1px solid #eeebee;
        }

        .el-color-picker__color-inner {
            border-radius: 3px;
        }
    }

    .poster-desc-item {
        flex: 0 0 100%;
        margin-top: 16px;
    }

    .nickname-switch {
        margin: 18px 0 32px;
    }

    .form-select {
        .el-popper {
            width: 100%;
            max-width: none;
        }

        .el-select-dropdown__item.hover {
            background-color: #fff0e6;
        }
    }

    .form-poster-desc {
        margin-bottom: 24px;
    }

    // 禁用的情况下展示对应的颜色
    .el-color-picker.is-disabled {
        .el-color-picker__mask {
            display: none;
        }
    }
}

.select-poster-box {
    display: flex;
    align-items: flex-end;

    .select-poster-box-content {
        position: relative;
        overflow: hidden;
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
        margin-right: 8px;
        border-radius: 4px;
        background-color: #fff;

        > div {
            width: 100%;
            height: 100%;
        }

        .img {
            width: 100%;
            height: 100%;
        }

        .desc {
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            height: 28.8px;
            text-align: center;
            color: #fff;
            background-color: rgb(0 0 0 / 50%);
            line-height: 28.8px;
        }

        .el-upload {
            width: 100%;
            height: 100%;
            background-color: #fff;
        }
    }

    .select-poster-box-content-border {
        border: 1px solid #eaeaea;
    }

    .tip-text {
        color: #999;
        font-family: PingFangSC-Regular, 'PingFang SC';
        font-size: 14px;
        font-weight: 400;
        line-height: normal;
    }

    .img-icon {
        display: flex;
        align-items: center;
        flex-direction: column;
    }
}

.default-poster-box {
    overflow: hidden;
    flex: 0 0 100px;
    box-sizing: border-box;
    width: 100px;
    height: 100px;
    margin-right: 8px;
    border: 1px solid #eaeaea;
    border-radius: 4px;

    img {
        width: 100%;
        height: 100%;
    }
}

:global(.poster-setting-color-picker .el-color-predefine__color-selector > div) {
    outline: #e9e9e9 solid 1px;
}
